#include <buola/bbox/bservice.h>

using namespace buola;

class CMyService : public bbox::BService<CMyService>
{
public:
    CMyService() {}
    
    int GetAnswer() 
    {   
        msg_info() << "method call received\n";
        return 42;  
    }
    
public:
    template <class tIntrospector>
    static void Introspect(tIntrospector &pI)
    {
        pI.template AddMethod<int()>("GetAnswer",&CMyService::GetAnswer);
    }
};

int main(int pArgC,char **pArgs)
{
    buola_init(pArgC,pArgs);
    CMyService lService;
    bbox::register_service(&lService,"/org/buola/example_bbox_service");
    buola_main_loop();
    return buola_finish();
}
